//package teste;

//Lembrar que o compilador implementado é baseado no java 1.4, inclusive o aspectJ
//Assim, esse código não contém generics, por exemplo List<Formal> 

import polyglot.ast.*;
import polyglot.ext.jl.ast.Term_c;
import polyglot.types.Flags;
import polyglot.util.Position;
import polyglot.visit.CFGBuilder;
import abc.aspectj.ast.*;
import abc.aspectj.types.AJTypeSystem;
import abc.aspectj.visit.AspectMethods;

import java.util.List;

public class MultiIntro2 extends Term_c implements IntertypeDecl {

	private Flags modifiers;
	private TypeNode type;
	private String cl, name;
	private List/*<Formal>*/ param;
	private Block block;

	public MultiIntro2(Position pos, Flags m, TypeNode t, String c, String n, List/*<Formal>*/ l, Block b) {
		super(pos);
		modifiers = m;
		type = t;
		cl = c;
		name = n;
		param = l;
		block = b;
	}

	@Grammar extends intertype_member_declaration {
		MultiIntro2 ::=			
			m = modifiers_opt
			t = type
			id1 = IDENTIFIER
			"+." id2 = IDENTIFIER
			"(" p = formal_parameter_list_opt ")"
			b = block
		{ 
			String c = id1.getIdentifier(); 
            String n = id2.getIdentifier();
            MultiIntro x = new MultiIntro(parser.pos(m, b), m, t, c, n, p, b);		
			RESULT = x; 
		};
	}

	public static void main(String[] args) {
		System.out.println("Hello world");
	}

	public List acceptCFG(CFGBuilder arg0, List arg) {
		return arg;
	}

	public Term entry() {
		return this;
	}

	public TypeNode host() {
		return null;
	}

	public Expr thisReference(AJNodeFactory arg0, AJTypeSystem arg1) {
		// TODO Auto-generated method stub
		return null;
	}

	public void aspectMethodsEnter(AspectMethods arg0) {
		
	}

	public Node aspectMethodsLeave(AspectMethods arg0, AJNodeFactory arg1,
			AJTypeSystem arg2) {
		return this;
	}
	
	

}
